package org.zjt.java.demo.repository;


import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.zjt.java.demo.entity.User;
import org.zjt.java.demo.entity.UserQuery;

import java.util.List;

@Repository("UserRepositoryImpl")
public interface UserRepository {
    int countByExample(UserQuery example);

    int deleteByExample(UserQuery example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserQuery example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserQuery example);

    int updateByExample(@Param("record") User record, @Param("example") UserQuery example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 根据用户账号查询
     * @param userNumber
     * @return
     */
    User selectByNumber(@Param("userNumber") String userNumber);
}